#   常数部分 - 游戏内固定参数，比如地图按钮的位置。
#   当更换设备时，由于屏幕分辨率发生变化，这些数值都会失效，放在这里统一更改，比去代码里寻找效率更高。

class COTCConstants:
    def __init__(self, server):
        #   小地图移动坐标
        self.valore_main_boulevard_coord = [296, 478]
        self.emberglow_east_district_coord = [932, 452]
        self.emberglow_laboratory_coord = [759, 347]
        self.emberglow_laboratory_to_town_coord = [272, 544]
        self.cragspear_slums_coord = [841, 616]
        self.theatropolis_library_coord = [447, 416]
        self.rippletide_residence_coord = [797, 337]

        #   UI单点坐标
        self.screen_center_coord = [1080, 540]          # 屏幕中心
        self.screen_top_center_coord = [1080, 60]       # 屏幕上中心
        self.menu_btn_coord = [85, 600]                 # 主界面 - 选单按钮位置
        self.menu_others_btn_coord = [1155, 610]        # 主界面 - 其他按钮位置
        self.switch_account_btn_coord = [400, 360]      # 其他界面 - 切换帐号按钮位置
        self.switch_account_btn2_coord = [234, 311]     # 切换帐号界面 - 切换帐号按钮位置
        self.switch_account_more_coord = [689, 400]     # 切换帐号界面 - 切换帐号按钮位置
        self.minimap_coord = [1857, 199]                # 主界面 - 小地图中箭头的坐标
        self.party_btn_coord = [220, 600]               # 主界面 - 队伍按钮坐标
        self.worldmap_btn_coord = {                     # 主界面 - 大陆地图按钮坐标
            'tw': [1430, 900],
            'en': [1400, 900],
            'cn': [1400, 900],
        }[server]
        self.town_cat_world_coord = [250, 250]          # 世界地图 - 现世按钮
        self.town_cat_hell_coord = [250, 400]           # 世界地图 - 边狱按钮
        self.town_cat_world_obscured_coord = [250, 550]  # 世界地图 - 现世遗忘按钮
        self.allies_list_btn_coord = [116, 543]         # 队伍界面 - 支援者列表按钮坐标
        self.first_ally_coord = [387, 256]              # 支援者列表 - 第一位支援者位置坐标
        self.part_ways_btn_coord = [796, 597]           # 支援者列表 - 告别按钮位置
        self.general_ok_btn_coord = [1316, 730]          # 菜单界面 - 通用OK按钮坐标，如：确认告别的OK按钮，确认大地图前往某处的是按钮
        self.close_menu_btn_coord = [1236, 22]          # 菜单界面 - 右上角叉按钮位置
        self.return_menu_btn_coord = [1236, 22]         # 菜单界面 - 右上角叉按钮位置
        self.inquire_btn_coord = [1176, 626]            # 主界面 - 打听按钮位置
        self.impress_btn_coord = [1043, 400]            # 打听界面 - 收服按钮位置
        self.entreat_btn_coord = [1043, 280]            # 打听界面 - 央求按钮位置
        self.entreat_scroll_coord = [1042, 485]         # 打听界面 - 央求按钮滚动条位置
        self.confirm_impress_btn_coord = [763, 500]     # 收服界面 - 收服按钮位置
        self.lower_ok_btn_coord = [1317, 748]           # 菜单界面 - 低位OK按钮坐标，如：确认收服OK按钮，确认住店按钮
        self.center_ok_btn_coord = [1080, 726]          # 菜单界面 - 中间OK按钮坐标
        self.worldmap_proceed_btn_coord = [1678, 956]   # 世界地图 - 前往这里按钮位置
        self.worldmap_choose_entry_coord = [1070, 414]  # 世界地图 - 3.0选择目的地按钮
        self.worldmap_zoom_out_btn_coord = [1934, 971]  # 世界地图 - 缩放按钮位置
        self.swipe_start_coord = [1725, 1060]           # 主界面 - 刷怪时划屏起点
        self.swipe_end_coord = [2045, 1060]             # 主界面 - 刷怪时划屏终点
        self.start_battle_btn_coord = [1876, 971]       # 战斗界面 - 攻击按钮位置
        self.all_boost_btn_coord = {                    # 战斗界面 - 全体boost按钮位置
            'tw': [1537, 966],
            'en': [1537, 966],
            'cn': [1296, 966],
        }[server]
        self.use_ultimate_coord = [1327, 150]           # 战斗界面 - 使用必杀按钮位置
        self.activate_ultimate_coord = [1658, 694]      # 必杀界面 - 使用必杀按钮位置
        self.ultimate_btn_coord = [1254, 321]           # 必杀界面 - 必杀按钮位置
        self.keeper_btn_coord = [1606, 320]             # 必杀界面 - 支炎兽按钮位置
        self.latent_power_btn_coord = [958, 36]         # 技能界面 - 潜力技能按钮位置
        self.activate_ultimate_coord_2 = [1660, 787]    # 必杀界面 - 使用必杀按钮位置_复合UI
        self.memories_read_btn_coord = [1776, 283]      # 追忆之书 - 阅读按钮位置
        self.memories_ok_btn_coord = [1106, 834]        # 追忆之书 - 确认阅读按钮位置
        self.flee_battle_btn_coord = [1045, 967]        # 战斗界面 - 逃跑按钮位置
        self.enter_coord_network_issue = [632, 425]     # 台服 - 各种登录失败按钮坐标
        self.fast_login_coord = [663, 645]              # 台服 - 快速登录按钮坐标
        self.fast_login_first_acc_coord = [515, 260]    # 台服 - 快速登录按钮坐标
        self.login_retry1_coord = [638, 395]            # 台服 - 各种登录失败按钮坐标
        self.login_retry2_coord = [642, 491]            # 台服 - 各种登录失败按钮坐标
        self.keeper_upgrade_coord = [1080, 60]          # 支炎兽亲密度升级按钮位置
        self.skills_panel_coord = [                     # 战斗界面 - 开启技能面板位置
            [1850, 115],
            [1850, 330],
            [1850, 545],
            [1850, 760]
        ]
        self.switch_character_coord = [1893, 953]       # 战斗界面 - 交替按钮位置
        self.skills_coord = [                           # 战斗界面 - 各技能及各boost位置
            [[1400, 300, 0, 0],                             # 普攻
             [1400, 300, 1000, 300],
             [1400, 300, 1100, 300],
             [1400, 300, 1200, 300]],
            [[1400, 460, 0, 0],                             # 技能1
             [1400, 460, 1000, 460],
             [1400, 460, 1100, 460],
             [1400, 460, 2020, 460]],
            [[1400, 620, 0, 0],                             # 技能2
             [1400, 620, 1000, 620],
             [1400, 620, 1100, 620],
             [1400, 620, 1200, 620]],
            [[1400, 780, 0, 0],                             # 技能3
             [1400, 780, 1000, 780],
             [1400, 780, 1100, 780],
             [1400, 780, 2020, 780]],
            [[1400, 940, 0, 0],                             # 技能4
             [1400, 940, 1000, 940],
             [1400, 940, 1100, 940],
             [1400, 940, 1200, 940]],
            [[1000, 450, 0, 0],                             # 支炎兽技能
             [1000, 450, 1400, 450],
             [1000, 450, 1550, 450],
             [1000, 450, 1700, 450]]
        ]

        #   城镇依赖坐标
        self.inn_exit_coord = {                         # 小地图 - 城镇旅店出口坐标
            'valore': [534, 447],
            'emberglow': [534, 447],
            'theatropolis': [645, 447],
            'rippletide': [533, 447],
            'cragspear': [526, 448],
            'clearbrook': [498, 448],
            'sunshade': [695, 404],
            'shepherds-rock': [552, 447],
        }
        self.bt_npc_coord_on_minimap = {                # 小地图 - 历战NPC坐标
            'bt_axe': [845, 469],
            'bt_bow': [679, 541],
            'bt_tome': [0, 0],
            'bt_spear': [0, 0],
            'bt_dagger': [727, 535],
            'bt_staff': [741, 302],
            'bt_fan': [284, 270],
            'bt_blade': [760, 391],
        }

        #   非坐标参数
        self.get_town_name_by_npc = {                   # 获取历战NPC所在城市名称
            'bt_axe': 'valore',
            'bt_bow': 'emberglow',
            'bt_tome': 'theatropolis',
            'bt_spear': 'rippletide',
            'bt_dagger': 'cragspear',
            'bt_staff': 'clearbrook',
            'bt_fan': 'sunshade',
            'bt_blade': 'shepherds-rock',
        }

        #   多点找色检查类参数
        self.minimap_exist = {
            'tw': ["#E2D57E", "0|1|#E2D57E", [1838, 188, 1878, 228]],
            'en': ["#E2D57E", "0|1|#E2D57E", [1858, 204, 1859, 206]],
            'cn': ["#E2D57E", "0|1|#E2D57E", [1838, 188, 1878, 228]],
        }[server]
        self.minimap_opened = {
            'tw': ["#FFFFFF", "1|0|#FFFFFF", [42, 952, 44, 953]],
            'en': ["???"],
            'cn': ["#F7F7F7", "0|1|#F8F8F8", [95, 964, 96, 966]],
        }[server]
        self.dialog_exist = ["#D0C4B4", "20|0|#D0C4B4, 40|0|#D0C4B4", [40, 40, 2120, 1040]]
        self.menu_exist = {     # 由于出现有先后顺序，需要检查最后一个按钮
            'tw': ["#E9E4E1", "-2|13|#EDE8E5", [276, 932, 279, 946]],
            'en': ["#F0EBE8", "0|1|#F0EBE8", [1560, 940, 1561, 942]],  # 使用了Find的文字做判断，以后更新会导致失效，需要更新脚本
            'cn': ["#ECE7E4", "0|1|#ECE7E4", [278, 933, 279, 943]]
        }[server]
        self.menu_opened = {
            'tw': ["#E9E9E9", "1|1|#E9E9E9", [1236, 20, 1238, 22]],
            'en': ["#E9E9E9", "1|1|#E9E9E9", [1236, 20, 1238, 22]],
            'cn': ["???"],
        }[server]
        self.menu_clicked = ["#F0EBE8", "1|0|#F0EBE8", [1172, 637, 1174, 638]]    # 点击选单后，检测其他是否出现
        self.unreal_shown = ["#2D2E2B", "1|1|#2D2E2B", [457, 534, 459, 536]]
        self.init_screen_menu_shown = ["#F0ECE7", "0|1|#F0ECE7", [1175, 672, 1176, 674]]
        self.account_menu_opened = ["#FFFFFF", "1|1|#FFFFFF", [595, 347, 597, 349]]
        self.account_list_opened = ["#B2CB39", "1|0|#B2CB39", [680, 475, 682, 476]]
        self.battle_idling = {
            'tw': ["#FFFFFF", "1|1|#FFFFFF", [1808, 917, 1963, 991]],
            'en': ["#FFFFFF", "1|1|#FFFFFF", [1870, 960, 1872, 962]],
            'cn': ["#FFFFFF", "1|1|#FFFFFF", [1919, 965, 1921, 967]],
        }[server]
        self.keeper_skill_idling = {
            'tw': ["???"],
            'en': ["#E2DFDF", "1|0|#E2DFDF", [1250, 451, 1252, 452]],
            'cn': ["???"],
        }[server]
        self.ultimate_menu_opened = {
            'tw': ["???"],
            'en': ["#FFF7F7", "1|0|#FFF7F7", [1223, 233, 1225, 234]],
            'cn': ["???"],
        }[server]
        self.ultimate_btn_clicked = {
            'tw': ["???"],
            'en': ["#C0CFCB", "1|0|#C0CFCB", [1145, 297, 1209, 339]],
            'cn': ["???"],
        }[server]
        self.keeper_btn_clicked = {
            'tw': ["???"],
            'en': ["#C0CFCB", "1|0|#C0CFCB", [1498, 299, 1561, 340]],
            'cn': ["???"],
        }[server]
        self.complex_ultimate_menu = {
            'tw': ["???"],
            'en': ["#E2DFDF", "1|0|#E2DFDF", [1000, 889, 1002, 892]],
            'cn': ["???"],
        }[server]
        self.memories_confirm_read = {
            'tw': ["#FFFFFF", "0|1|#FFFFFF", [793, 601, 794, 603]],
            'en': ["#FFFFFF", "0|1|#FFFFFF", [1300, 900, 1301, 902]],
            'cn': ["???"],
        }[server]
        self.memories_read_exist = {
            'tw': ["???"],
            'en': ["#F0ECE7", "1|0|#F0ECE7", [1742, 142, 1744, 143]],
            'cn': ["???"],
        }[server]
        self.black_screen_exist = ["#000000", "1|1|#000000", [1079, 539, 1081, 541]]
        self.black_screen_exist_2 = ["#000000", "1|1|#000000", [1858, 205, 1860, 207]]
        self.entreat_failed = ["#FFFFFF", "0|1|#FFFFFF", [620, 360, 621, 362]]
        self.entreat_failed_2 = ["#DA7C7C", "0|1|#DA7C7C", [604, 258, 605, 260]]
        self.init_screen_ready1 = ["#0055AA", "0|1|#0055AA", [39, 675, 40, 677]]
        self.init_screen_ready2 = ["#00264C", "0|1|#00264C", [39, 675, 40, 677]]
        self.login_retry1 = ["#F0EBE8", "1|0|#F0EBE8", [495, 301, 497, 302]]
        self.login_retry2 = ["#F0EBE8", "0|1|#F0EBE8", [578, 205, 579, 207]]
        self.emu_forbidden = ["#009688", "1|0|#009688", [904, 448, 906, 449]]
        self.fast_login_exist = ["#2787F5", "1|1|#2787F5", [578, 635, 580, 637]]
        self.town_cat_world = {
            'tw': ["#7F7F7F", "0|1|#7F7F7F", [429, 250, 430, 252]],
            'en': ["#D3D3D3", "0|1|#D3D3D3", [430, 250, 431, 252]],
            'cn': ["#7F7F7F", "0|1|#7F7F7F", [429, 250, 430, 252]],
        }[server]
        self.town_cat_hell = {
            'tw': ["#7F7F7F", "0|1|#7F7F7F", [429, 400, 430, 402]],
            'en': ["#D3D3D3", "0|1|#D3D3D3", [430, 400, 431, 402]],
            'cn': ["#7F7F7F", "0|1|#7F7F7F", [429, 400, 430, 402]],
        }[server]
        self.town_cat_world_obscured = {
            'tw': ["???"],
            'en': ["#D3D3D3", "0|1|#D3D3D3", [430, 550, 431, 552]],
            'cn': ["???"],
        }[server]
        self.town_menu_opened = {
            'tw': ["#F9FAFA", "0|1|#F9FAFA", [1673, 952, 1674, 954]],
            'en': ["#707070", "0|1|#707070", [1393, 350, 1394, 352]],
            'cn': ["#FCFDFD", "0|1|#FCFDFD", [1733, 954, 1734, 956]],
        }[server]
        self.ok_move_exist = {
            'tw': ["#ECEFF0", "1|0|#ECEFF0", [1326, 730, 1328, 731]],
            'en': ["#FFFFFF", "0|1|#FFFFFF", [1300, 730, 1301, 732]],
            'cn': ["#F0F2F3", "1|0|#F0F2F3", [1319, 726, 1321, 727]],
        }[server]
        self.ok_zoom_out = {
            'tw': ["???"],
            'en': ["#000000", "0|1|#000000", [1935, 967, 1936, 969]],
            'cn': ["???"],
        }[server]
        self.inquire_exist = {
            'tw': ["#66AAAA", "1|0|#66AAAA", [1000, 651, 1100, 654]],
            'en': ["#66AAAA", "1|0|#66AAAA", [1000, 651, 1100, 654]],
            'cn': ["???"],
        }[server]
        self.inquire_menu_opened = ["#FFFFFF", "1|0|#FFFFFF", [217, 111, 226, 112]]
        self.confirm_entreat_exist = {
            'tw': ["#B85D5D", "0|1|#B85D5D", [801, 640, 802, 642]],
            'en': ["???"],
            'cn': ["???"],
        }[server]
        self.confirm_entreat_scrolled = {
            'tw': ["#F0ECE7", "0|1|#F0ECE7", [716, 428, 717, 430]],
            'en': ["???"],
            'cn': ["???"],
        }[server]
        self.confirm_entreat_selected = {
            'tw': ["#FFFFFF", "0|1|#FFFFFF", [772, 560, 773, 562]],
            'en': ["???"],
            'cn': ["???"],
        }[server]
        self.confirm_impress_exist = {
            'tw': ["#FFFFFF", "0|1|#FFFFFF", [764, 494, 765, 496]],
            'en': ["#FFFFFF", "1|0|#FFFFFF", [764, 495, 766, 496]],
            'cn': ["???"],
        }[server]
        self.character_all_boosted = {
            'tw': ["#E0DDD8", "0|1|#E4E0DB", [1572, 987, 1573, 989]],
            'en': ["#BBBBBB", "1|0|#CBCBCB", [1598, 979, 1600, 980]],
            'cn': ["#BABABA", "0|1|#BABABA", [1350, 965, 1351, 967]],
        }[server]
        self.skills_panel_standby = ["#EEE6DD", "1|1|#EEE6DD", [1193, 69, 1233, 88]]
        self.switch_character_done = {
            'tw': ["#030303", "1|0|#030303", [1426, 22, 1428, 23]],       # 检查技能面板上方前卫和后卫
            'en': ["#F0EBE8", "1|1|#F0EBE8", [1415, 20, 1417, 22]],       # 检查技能面板上方Front和Back
            'cn': ["???"],
        }[server]
        self.allies_list_btn_exist = ["#FFFFFF", "0|1|#FFFFFF", [51, 534, 52, 536]]
        self.allies_list_opened = {
            'tw': ["#F0EBE8", "1|1|#F0EBE8", [267, 104, 269, 106]],
            'en': ["#F0EBE8", "1|1|#F0EBE8", [260, 102, 262, 104]],
            'cn': ["???"],
        }[server]
        self.ally_parting_ways = {
            'tw': ["#FFFFFF", "0|1|#FFFFFF", [785, 481, 786, 483]],
            'en': ["#FFFFFF", "0|1|#FFFFFF", [785, 482, 786, 484]],
            'cn': ["???"],
        }[server]
        self.item_obtained = {
            'tw': ["#FFFFFF", "0|1|#FFFFFF", [668, 282, 669, 284]],
            'en': ["#FFFFFF", "1|0|#FFFFFF", [700, 278, 702, 279]],
            'cn': ["???"],
        }[server]
        self.three_fleece_obtained = {
            'tw': ["#F0ECE7", "4|0|#F0ECE7", [725, 337, 742, 338]],
            'en': ["#F0ECE7", "4|0|#F0ECE7", [781, 333, 820, 334]],
            'cn': ["???"],
        }[server]

        self.fallen_cait_exist = {
            'tw': ["#742637", "0|1|#271F23", [220, 91, 221, 93]],
            'en': ["#82283A", "0|1|#53232F", [221, 90, 222, 92]],
            'cn': ["#81283A", "0|1|#742637", [220, 90, 221, 92]],
        }[server]
        self.sacred_cait_exist = {
            'tw': ["#354D27", "0|1|#95A499", [216, 70, 217, 72]],
            'en': ["#38513C", "1|1|#6574B1", [227, 74, 229, 76]],
            'cn': ["???"],
        }[server]
        self.fallen_villain_exist = ["???"]
        self.fallen_thespian_exist = ["#5E0A12", "1|1|#B4626C", [181, 57, 546, 136]]

        self.inn_exist = ["#FFFFFF", "0|3|#FFFFFF", [1080, 180, 1081, 550]]
        # {
        #     'valore': ["#FFFFFF", "0|1|#FFFFFF", [628, 203, 629, 205]],
        #     'emberglow': ["#FFFFFF", "0|1|#FFFFFF", [1064, 254, 1065, 256]],
        #     'theatropolis': ["#FFFFFF", "0|1|#FFFFFF", [628, 246, 629, 248]],
        #     'rippletide': ["#FFFFFF", "0|1|#FFFFFF", [628, 237, 629, 239]],
        #     'cragspear': ["#FFFFFF", "0|1|#FFFFFF", [628, 233, 629, 235]],
        #     'clearbrook': ["#FFFFFF", "0|1|#FFFFFF", [628, 242, 629, 244]],
        #     'sunshade': ["#FFFFFF", "0|1|#FFFFFF", [628, 238, 629, 240]],
        #     'shepherds-rock': ["#FFFFFF", "0|1|#FFFFFF", [628, 230, 629, 232]],
        #     'grandport': ["#FFFFFF", "0|1|#FFFFFF", [628, 229, 629, 231]],
        #     'sufrataljah': ["#FFFFFF", "0|1|#FFFFFF", [628, 198, 629, 200]],
        #     'i’cirlo': ["#FFFFFF", "0|1|#FFFFFF", [628, 217, 629, 219]],
        #     'berecain': ["#FFFFFF", "1|1|#FFFFFF", [1080, 380, 1082, 382]],
        # }
        self.inn_host_exist = ["#EEE6DD", "3|0|#EEE6DD", [899, 347, 1454, 487]]
        # {
        #     'valore': ["#A19E94", "13|-13|#9F9891, 4|5|#54544E", [696, 278, 710, 297]],
        #     'emberglow': ["#ECE5DD", "1|1|#ECE5DD", [1087, 395, 1194, 452]],
        #     'theatropolis': ["#A19E94", "13|-13|#9F9891, 4|5|#54544E", [549, 268, 593, 301]],
        #     'rippletide': ["#A19E94", "13|-13|#9F9891, 4|5|#54544E", [657, 272, 671, 291]],
        #     # 'cragspear': ["#A19E94", "13|-13|#9F9891, 4|5|#575750", [658, 226, 748, 289]],
        #     'cragspear': ["#A19E94", "13|-13|#9F9891, 4|5|#54544E", [658, 226, 748, 289]],
        #     'clearbrook': ["#A19E94", "13|-13|#9F9891, 4|5|#54544E", [745, 271, 759, 290]],
        #     'sunshade': ["#A19E94", "13|-13|#9F9891, 4|5|#54544E", [842, 238, 856, 257]],
        #     'shepherds-rock': ["#A19E94", "13|-13|#9F9891, 4|5|#54544E", [644, 272, 658, 291]],
        #     'grandport': ["#A19E94", "13|-13|#9F9891, 4|5|#54544E", [720, 274, 734, 293]],
        #     'sufrataljah': ["#A19E94", "13|-13|#9F9891, 4|5|#54544E", [737, 265, 751, 284]],
        #     'i’cirlo': ["#A19E94", "13|-13|#9F9891, 4|5|#54544E", [805, 244, 819, 263]],
        #     'berecain': ["#ECE5DD", "1|1|#ECE5DD", [1178, 314, 1332, 435]],
        # }
        self.map_const = {
            'valley-of-death': {
                'rest_town': 'shepherds-rock',
                'town_coord': [521, 194],
                'wild_coord': [754, 528],
                'init_arr': [
                    {
                        'init_coord': [426, 294],
                        'init_idle': 3,
                    },
                ],
            },
            'cavern-of-mists': {
                'rest_town': 'shepherds-rock',
                'town_coord': [471, 466],
                'wild_coord': [801, 257],
                'init_arr': [
                    {
                        'init_coord': [682, 462],
                        'init_idle': 3,
                    },
                ],
            },
            'stillwater-subterrane': {
                'rest_town': 'clearbrook',
                'town_coord': [563, 251],
                'wild_coord': [717, 474],
                'init_arr': [
                    {
                        'init_coord': [583, 443],
                        'init_idle': 3,
                    },
                ],
            },
            'road-to-castle-edoras': {
                'rest_town': 'cragspear',
                'town_coord': [536, 388],
                'wild_coord': [639, 364],
                'init_arr': [
                    {
                        'init_coord': [514, 117],
                        'init_idle': 15,
                    },
                    {
                        'init_coord': [897, 476],
                        'init_idle': 3,
                    },
                    {
                        'init_coord': [684, 235],
                        'init_idle': 5,
                    },
                ],
            },
            'castle-edoras': {
                'rest_town': 'cragspear',
                'town_coord': [636, 443],
                'wild_coord': [639, 364],
                'init_arr': [
                    {
                        'init_coord': [514, 117],
                        'init_idle': 15,
                    },
                    {
                        'init_coord': [532, 153],
                        'init_idle': 3,
                    },
                    {
                        'init_coord': [597, 94],
                        'init_idle': 8,
                    },
                    {
                        'init_coord': [437, 458],
                        'init_idle': 3,
                    },
                ],
            },
            'cave-of-laments': {
                'rest_town': 'emberglow',
                'town_coord': [824, 203],
                'wild_coord': [453, 525],
                'init_arr': [
                    {
                        'init_coord': [549, 303],
                        'init_idle': 5,
                    },
                ],
            },
            'flamesgrace-wilds': {
                'rest_town': 'emberglow',
                'town_coord': [724, 229],
                'wild_coord': [453, 525],
                'init_mode': 2,
                'init_arr': [
                    {
                        'init_coord': [928, 247],
                        'init_idle': 1,
                    },
                    {
                        'init_coord': [370, 497],
                        'init_idle': 3,
                    },
                ],
            },
            'cathedral-of-tytos-underground': {
                'rest_town': 'emberglow',
                'town_coord': [586, 454],
                'wild_coord': [693, 267],
                'init_arr': [
                    {
                        'init_coord': [699, 614],
                        'init_idle': 4,
                    },
                ],
            },
            'whitesand-cave': {
                'rest_town': 'sufrataljah',
                'town_coord': [630, 496],
                'wild_coord': [648, 232],
                'init_arr': [
                    {
                        'init_coord': [704, 515],
                        'init_idle': 5,
                    },
                ],
            },
            'sea-cavern': {
                'rest_town': 'grandport',
                'town_coord': [915, 355],
                'wild_coord': [363, 370],
                'init_arr': [
                    {
                        'init_coord': [787, 352],
                        'init_idle': 5,
                    },
                ],
            },
            'grandport-coast': {
                'rest_town': 'grandport',
                'town_coord': [845, 347],
                'wild_coord': [363, 370],
                'init_arr': [
                    {
                        'init_coord': [928, 190],
                        'init_idle': 1,
                    },
                    {
                        'init_coord': [552, 398],
                        'init_idle': 5,
                    },
                ],
            },
            'grandport-sewers': {
                'rest_town': 'grandport',
                'town_coord': [656, 449],
                'wild_coord': [624, 273],
                'init_arr': [
                    {
                        'init_coord': [943, 367],
                        'init_idle': 5,
                    },
                ],
            },
            'cave-of-origin': {
                'rest_town': 'emberglow',
                'town_coord': [585, 274],
                'wild_coord': [694, 453],
                'init_arr': [
                    {
                        'init_coord': [418, 538],
                        'init_idle': 4,
                    },
                ],
            },
            'spiny-grotto': {
                'rest_town': 'i’cirlo',
                'town_coord': [396, 269],
                'wild_coord': [887, 453],
                'init_arr': [
                    {
                        'init_coord': [379, 577],
                        'init_idle': 5,
                    },
                ],
            },
            'golden-palace': {
                'rest_town': 'sufrataljah',
                'town_coord': [888, 548],
                'wild_coord': [390, 169],
                'init_arr': [
                    {
                        'init_coord': [374, 323],
                        'init_idle': 5,
                    },
                ],
            },
            'middlesea': {
                'rest_town': 'rippletide',
                'town_coord': [1012, 342],
                'wild_coord': [271, 380],
                'init_arr': [
                    {
                        'init_coord': [490, 244],
                        'init_idle': 16,
                    },
                    {
                        'init_coord': [619, 440],
                        'init_idle': 3,
                    },
                ],
            },
            'sweltering-cave': {
                'rest_town': 'berecain',
                'town_coord': [783, 260],
                'wild_coord': [494, 466],
                'init_arr': [
                    {
                        'init_coord': [627, 452],
                        'init_idle': 5,
                    },
                ],
            },
            'hell-geist-canyon': {
                'map_type': 2,
                'rest_town': 'cragspear',
                'town_coord': [1889, 504],
                'town_cat': 'world',
                'wild_coord': [271, 581],
                'wild_cat': 'hell',
                'init_mode': 1,
                'init_arr': [
                    {
                        'init_coord': [763, 900],
                        'init_idle': 5,
                    },
                ],
            },
            'hell-white-grape-hill-path': {
                'rest_town': 'valore',
                'town_coord': [582, 205],
                'town_cat': 'world',
                'wild_coord': [685, 453],
                'wild_cat': 'hell',
                'init_mode': 2,
                'init_arr': [
                    {
                        'init_coord': [597, 597],
                        'init_idle': 2,
                    },
                    {
                        'init_coord': [304, 338],
                        'init_idle': 5,
                    },
                ],
            },
            'hell-castle-edoras': {
                'rest_town': 'cragspear',
                'town_coord': [635, 441],
                'town_cat': 'world',
                'wild_coord': [646, 281],
                'wild_cat': 'hell',
                'init_mode': 2,
                'init_arr': [
                    {
                        'init_coord': [696, 488],
                        'init_idle': 3,
                    },
                ],
            },
            'hell-hornburg-pass': {
                'map_type': 2,
                'rest_town': 'berecain',
                'town_coord': [1500, 461],
                'town_cat': 'world',
                'wild_coord': [656, 624],
                'wild_cat': 'hell',
                'init_mode': 1,
                'init_arr': [
                    {
                        'init_coord': [1482, 661],
                        'init_idle': 3,
                    },
                ],
            },
            'hell-hornburg-castle': {
                'rest_town': 'berecain',
                'town_coord': [981, 469],
                'town_cat': 'world',
                'wild_coord': [297, 248],
                'wild_cat': 'hell',
                'init_mode': 2,
                'init_arr': [
                    {
                        'init_coord': [512, 318],
                        'init_idle': 5,
                    },
                ],
            },
            'corridors-of-contrition': {
                'rest_town': 'berecain',
                'town_coord': [608, 143],
                'town_cat': 'world',
                'wild_coord': [669, 585],
                'wild_cat': 'hell',
                'init_mode': 1,
                'init_arr': [
                    {
                        'init_coord': [843, 448],
                        'init_idle': 7,
                        'post_init_coord': [
                            [639, 312, 0],
                        ],
                    },
                    {
                        'init_coord': [838, 543],
                        'init_idle': 1,
                    },
                ],
            },
            'the-bridge-beyond': {
                'rest_town': 'berecain',
                'town_coord': [608, 143],
                'town_cat': 'world',
                'wild_coord': [669, 585],
                'wild_cat': 'hell',
                'init_mode': 2,
                'init_arr': [
                    {
                        'init_idle': 2,
                        'post_init_coord': [
                            [732, 335, 2],
                            [442, 358, 0],
                        ],
                    },
                    {
                        'init_coord': [901, 553],
                        'init_idle': 4,
                    },
                    {
                        'init_coord': [516, 489],
                        'init_idle': 5,
                    },
                ],
            },
            'crimson-river-traverse': {
                'map_type': 2,
                'rest_town': 'berecain',
                'town_coord': [1033, 208],
                'town_cat': 'world',
                'wild_coord': [1126, 876],
                'wild_cat': 'hell',
                'init_mode': 1,
                'init_arr': [
                    {
                        'init_idle': 2,
                        'post_init_coord': [
                            [1215, 504, 1],
                            [777, 540, 0],
                        ],
                    },
                    {
                        'init_coord': [573, 620],
                        'init_idle': 3,
                    },
                    {
                        'init_coord': [837, 549],
                        'init_idle': 2,
                    },
                    {
                        'init_coord': [1125, 738],
                        'init_idle': 3,
                    },
                ],
            },
            'flamebearers-shrine-sanctum': {
                'map_type': 3,
                'rest_town': 'emberglow',
                'town_coord': [1306, 1031],
                'town_cat': 'world',
                'wild_coord': [852, 74],
                'wild_cat': 'world_obscured',
                'init_mode': 1,
                'init_arr': [
                    {
                        'init_coord': [1178, 608],
                        'init_idle': 7,
                        'post_init_coord': [
                            [1344, 368, 1],
                            [1368, 623, 0],
                        ],
                    },
                    {
                        'init_idle': 0.5,
                    },
                ],
            },
            'flamebearers-shrine-sanctum2': {
                'map_type': 3,
                'rest_town': 'emberglow',
                'town_coord': [1306, 1031],
                'town_cat': 'world',
                'wild_coord': [852, 74],
                'wild_cat': 'world',
                'init_mode': 1,
                'init_arr': [
                    {
                        'init_coord': [1178, 608],
                        'init_idle': 7,
                        'post_init_coord': [
                            [1344, 368, 1],
                            [1368, 623, 0],
                        ],
                    },
                    {
                        'init_idle': 0.5,
                    },
                ],
            },
            'sands-of-rapacity': {
                'map_type': 3,
                'rest_town': 'victors-hollow',
                'town_coord': [207, 740],
                'town_cat': 'world|zoom',
                'wild_coord': [1955, 100],
                'wild_cat': 'world_obscured|zoom',
                'init_mode': 1,
                'init_arr': [
                    {
                        'init_coord': [1016, 345],
                        'init_idle': 3,
                    },
                    {
                        'init_coord': [587, 420],
                        'init_idle': 11,
                        'post_init_coord': [
                            [1078, 504, 1],
                            [1374, 623, 0],
                        ],
                    },
                    {
                        'init_idle': 0.5,
                    },
                ],
            },
            '地图名称': {
                'rest_town': '恢复地名称',
                'town_coord': '恢复地相对坐标',
                'town_cat': '恢复地类别，world || hell，2.0后才可使用',
                'wild_coord': '回野外相对坐标',
                'wild_cat': '野外类别，world || hell，2.0后才可使用',
                'init_mode': '0:不初始，1:单次初始，2:多次初始',
                'init_arr': [
                    {
                        'init_coord': '初始化坐标',
                        'init_idle': '初始化等待时间',
                        'post_init_coord': '初始化结束时点击坐标',
                    },
                ],
            },
        }
        self.bt_npc_exist = {
            'tw': {
                'bt_axe': ["#D59690", "1|1|#D28F8A, 2|2|#D98882", [583, 275, 841, 337]],
                'bt_bow': ["#D59690", "1|1|#D28F8A, 2|2|#D98882", [582, 256, 949, 462]],
                'bt_tome': ["#D59690", "1|1|#D28F8A, 2|2|#D98882", [630, 220, 740, 330]],
                'bt_spear': ["#D59690", "1|1|#D28F8A, 2|2|#D98882", [764, 245, 1056, 344]],
                'bt_dagger': ["#D59690", "1|1|#D28F8A, 2|2|#D98882", [362, 206, 873, 544]],
                'bt_staff': ["#D59690", "1|1|#D28F8A, 2|2|#D98882", [362, 206, 873, 544]],
                'bt_fan': ["#D59690", "1|1|#D28F8A, 2|2|#D98882", [385, 285, 575, 350]],
                'bt_blade': ["#D59690", "1|1|#D28F8A, 2|2|#D98882", [500, 265, 860, 320]],
                'mikhail': ["#92B0C1", "1|1|#8AABBE, 2|2|#79A7BD", [470, 273, 580, 349]],
            },
            'en': {
                'bt_axe': ["#D59590", "1|1|#D28F8A, 2|2|#D98882", [583, 275, 841, 337]],
                'bt_bow': ["#D59590", "1|1|#D28F8A, 2|2|#D98882", [582, 256, 949, 462]],
                'bt_tome': ["#D59590", "1|1|#D28F8A, 2|2|#D98882", [630, 220, 740, 330]],
                'bt_spear': ["#D59590", "1|1|#D28F8A, 2|2|#D98882", [764, 245, 1056, 344]],
                'bt_dagger': ["#D59590", "1|1|#D28F8A, 2|2|#D98882", [362, 206, 873, 544]],
                'bt_staff': ["#D59590", "1|1|#D28F8A, 2|2|#D98882", [362, 206, 873, 544]],
                'bt_fan': ["#D59590", "1|1|#D28F8A, 2|2|#D98882", [385, 285, 575, 350]],
                'bt_blade': ["#D59590", "1|1|#D28F8A, 2|2|#D98882", [500, 265, 860, 320]],
            },
            'cn': ["???"],
        }[server]
        self.bt_ally_exist = {
            # 国际服比台服坐标高16单位
            'bt_axe': ["#492424", "1|1|#B8AA94", [334, 215, 336, 233]],
            'bt_bow': ["#5D4B32", "1|1|#E4B98E", [334, 210, 336, 228]],
            'bt_tome': ["#002211", "1|1|#CF7853", [341, 215, 343, 233]],
            'bt_spear': ["#AA947D", "1|1|#EEBB99", [336, 205, 338, 223]],
            'bt_dagger': ["#BB7B60", "1|1|#A5AA88", [339, 207, 341, 225]],
            'bt_staff': ["#BCAD90", "1|1|#646854", [336, 205, 338, 223]],
            'bt_fan': ["#002211", "1|1|#FFEECC", [341, 218, 343, 236]],
            'bt_blade': ["#002211", "1|1|#FFEECC", [341, 218, 343, 236]],
        }
        self.sheep_exist = ["#FFFFFF", "3|0|#FFFFFF", [0, 160, 1280, 560]]

        self.attack_boost_level_applied = {
            'tw': [
                {
                    '2': ["#FFFFFF", "1|0|#FFFFFF", [1262, 148, 1264, 149]],
                    '3': ["#FFFFFF", "1|0|#FFFFFF", [1259, 142, 1261, 143]],
                    '4': ["#FFFFFF", "1|0|#FFFFFF", [1257, 145, 1259, 146]],
                },
                {
                    '2': ["#FFFFFF", "1|0|#FFFFFF", [1262, 291, 1264, 292]],
                    '3': ["#FFFFFF", "1|0|#FFFFFF", [1259, 285, 1261, 286]],
                    '4': ["#FFFFFF", "1|0|#FFFFFF", [1257, 288, 1259, 289]],
                },
                {
                    '2': ["#FFFFFF", "1|0|#FFFFFF", [1262, 434, 1264, 435]],
                    '3': ["#FFFFFF", "1|0|#FFFFFF", [1259, 428, 1261, 429]],
                    '4': ["#FFFFFF", "1|0|#FFFFFF", [1257, 431, 1259, 432]],
                },
                {
                    '2': ["#FFFFFF", "1|0|#FFFFFF", [1262, 577, 1264, 578]],
                    '3': ["#FFFFFF", "1|0|#FFFFFF", [1259, 571, 1261, 572]],
                    '4': ["#FFFFFF", "1|0|#FFFFFF", [1257, 574, 1259, 575]],
                },
            ],
            'en': [
                {
                    '2': ["#FFFFFF", "1|0|#FFFFFF", [1262, 149, 1264, 150]],
                    '3': ["#FFFFFF", "1|0|#FFFFFF", [1260, 143, 1262, 144]],
                    '4': ["#FFFFFF", "0|1|#FFFFFF", [1262, 145, 1263, 147]],
                },
                {
                    '2': ["#FFFFFF", "1|0|#FFFFFF", [1262, 292, 1264, 293]],
                    '3': ["#FFFFFF", "1|0|#FFFFFF", [1260, 286, 1262, 287]],
                    '4': ["#FFFFFF", "0|1|#FFFFFF", [1262, 288, 1263, 290]],
                },
                {
                    '2': ["#FFFFFF", "1|0|#FFFFFF", [1262, 435, 1264, 436]],
                    '3': ["#FFFFFF", "1|0|#FFFFFF", [1260, 429, 1262, 430]],
                    '4': ["#FFFFFF", "0|1|#FFFFFF", [1262, 431, 1263, 433]],
                },
                {
                    '2': ["#FFFFFF", "1|0|#FFFFFF", [1262, 578, 1264, 579]],
                    '3': ["#FFFFFF", "1|0|#FFFFFF", [1260, 572, 1262, 573]],
                    '4': ["#FFFFFF", "0|1|#FFFFFF", [1262, 574, 1263, 576]],
                },
            ],
            'cn': ["???"],
        }[server]
        self.skill_boost_level_applied = {
            'tw': [
                {
                    '2': ["#FFFFFF", "1|0|#FFFFFF", [1265, 148, 1267, 149]],
                    '3': ["#FFFFFF", "1|0|#FFFFFF", [1266, 142, 1268, 143]],
                    '4': ["#FFFFFF", "1|0|#FFFFFF", [1242, 137, 1244, 138]],
                },
                {
                    '2': ["#FFFFFF", "1|0|#FFFFFF", [1265, 291, 1267, 292]],
                    '3': ["#FFFFFF", "1|0|#FFFFFF", [1266, 285, 1268, 286]],
                    '4': ["#FFFFFF", "1|0|#FFFFFF", [1242, 280, 1244, 281]],
                },
                {
                    '2': ["#FFFFFF", "1|0|#FFFFFF", [1265, 434, 1267, 435]],
                    '3': ["#FFFFFF", "1|0|#FFFFFF", [1266, 428, 1268, 429]],
                    '4': ["#FFFFFF", "1|0|#FFFFFF", [1242, 423, 1244, 424]],
                },
                {
                    '2': ["#FFFFFF", "1|0|#FFFFFF", [1265, 577, 1267, 578]],
                    '3': ["#FFFFFF", "1|0|#FFFFFF", [1266, 571, 1268, 572]],
                    '4': ["#FFFFFF", "1|0|#FFFFFF", [1242, 566, 1244, 567]],
                },
            ],
            'en': [
                {
                    '2': ["#FFFFFF", "1|0|#FFFFFF", [1265, 149, 1267, 150]],
                    '3': ["#FFFFFF", "1|0|#FFFFFF", [1266, 143, 1268, 144]],
                    '4': ["#FAFBFB", "0|1|#FBFBFB", [2143, 215, 2144, 217]],
                },
                {
                    '2': ["#FFFFFF", "1|0|#FFFFFF", [1265, 292, 1267, 293]],
                    '3': ["#FFFFFF", "1|0|#FFFFFF", [1266, 286, 1268, 287]],
                    '4': ["#FFFFFF", "0|1|#FFFFFF", [1242, 284, 1243, 286]],
                },
                {
                    '2': ["#FFFFFF", "1|0|#FFFFFF", [1265, 435, 1267, 436]],
                    '3': ["#FFFFFF", "1|0|#FFFFFF", [1266, 429, 1268, 430]],
                    '4': ["#FFFFFF", "0|1|#FFFFFF", [1242, 427, 1243, 429]],
                },
                {
                    '2': ["#FFFFFF", "1|0|#FFFFFF", [1265, 578, 1267, 579]],
                    '3': ["#FFFFFF", "1|0|#FFFFFF", [1266, 572, 1268, 573]],
                    '4': ["#FBFBFB", "0|1|#F2F3F3", [2143, 859, 2144, 861]],
                },
            ],
            'cn': ["???"],
        }[server]


                #   Razor-边狱武器附魔
        self.jm_fuyulinghun_btn = ["#E3E7E8", "0|1|#F8F9F9", [1157, 614, 1158, 616]]    # 赋予灵魂按钮
        self.tc_queren_btn_null = ["#FFFFFF", "1|0|#FFFFFF", [807, 641, 809, 642]]     # 确认重新附魔按钮(空魂时)
        self.tc_queren_btn = ["#FFFFFF", "1|0|#FFFFFF", [807, 667, 809, 668]]       # 确认重新附魔按钮
        self.tc_xuanzeqitalinghun_btn_null = ["#E3E7E8", "0|1|#F8F9F9", [876, 558, 877, 560]]    # 结果界面选择其他灵魂按钮(空魂时)
        self.tc_xuanzeqitalinghun_btn =["#E3E6E8", "0|1|#F8F9F9", [859, 485, 860, 487]]     # 结果确认留下附魔后选择其他灵魂按钮
        self.tc_fanhui_btn_null = ["#FFFFFF", "0|1|#FFFFFF", [482, 558, 483, 560]]   # 结果界面返回按钮(空魂时)
        self.tc_fanhui_btn = ["#FFFFFF", "0|1|#FFFFFF", [499, 485, 500, 487]]   # 结果界面返回按钮
        self.tc_baoliu_ok_btn_dis = ["#6F6F6F", "1|0|#6F6F6F", [657, 647, 659, 648]]    # 保留灵魂界面未选择时确认按钮
        self.tc_baoliu_ok_btn = ["#FFFFFF", "1|0|#FFFFFF", [657, 647, 659,648]]         # 保留灵魂界面选择后确认按钮
        self.tc_baoliu_xiyou = ["#CBE6E6", "0|1|#CBE6E6", [888, 534, 889, 536]]     # 保留灵魂界面稀有色块
        self.tc_baoliu_xiyou_16 = ["#FFFFFF", "0|1|#ECECEC", [622, 523, 623, 525]]      # 伤害提升16%
